package com.home766.service;

import com.home766.dto.DictionaryDTO;
import com.home766.entity.Dictionary;
import net.biz.Page;
import net.biz.Pageable;
import net.biz.service.BaseService;

import java.util.List;
import java.util.Map;

public interface IDictionaryService extends BaseService<Dictionary, Long> {
	/**
	 * 查找根节点
	 * 
	 * @return 
	 */
	List<Dictionary> searchRoots();

	/**
	 * 查找跟节点
	 * 
	 * @param count
	 *            数量
	 * @return 
	 */
	List<Dictionary> searchRoots(Integer count);
	
	List<Dictionary> searchRoots(Boolean bool, Integer count);
	/***
	 * 根据id查询下级集合
	 * @param dictionaryId
	 * @return
	 */
	List<DictionaryDTO> searchChildren(Long dictionaryId);
	List<DictionaryDTO> searchChildren(Long dictionaryId, boolean bool);
	/**
	 * 分页
	 * @param params
	 * @param pageable
	 * @return
	 */
	Page<Dictionary> searchPage(Map<String, Object> params, Pageable pageable);
	
	/**
	 * 树
	 * @return
	 */
	String searchAll(Long id);
}
